package cloud.zt.springboot.constant;

/**
 * @author 赵潭
 * @date 2020/8/2 6:00 下午
 */
public class Constants {
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    public static final String LOGIN_TOKEN_KEY = "login_token";

    public static final String TOKEN = "token";

    public static final String LOGIN_USER_KEY = "login_user_key";

    public static final String TOKEN_PREFIX = "JD-";

    public static final Integer LAF_STATUS_NO = 1;

    public static final Integer LAF_STATUS_OK = 2;

    public static final Integer SECOND = 1000;

    public static final Integer MINUTE = 1000 * 60;

    public static final Integer HOUR = 1000 * 60 * 60;

    public static final Boolean SUCCESS = true;

    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    public static final Boolean FAILED = false;

    public static final Integer TOKEN_EXPIRE = 720;

    /**
     * 令牌自定义标识
     */
    public static final String TOKEN_AUTHENTICATION = "Authorization";

    /**
     * 用户ID字段
     */
    public static final String DETAILS_USER_ID = "user_id";

    /**
     * 用户名字段
     */
    public static final String DETAILS_USERNAME = "username";

    /**
     * 授权信息字段
     */
    public static final String AUTHORIZATION_HEADER = "authorization";

    /**
     * 请求来源
     */
    public static final String FROM_SOURCE = "from-source";

    /**
     * 内部请求
     */
    public static final String INNER = "inner";
}
